In most video games, a game engine runs according to the rules of the game taking into account user input and presenting an animated display that is responsive to the user input. For example, if the user presses a button that is a “jump” button according to the game rules, then the game engine would animate a character such that it appears to jump. The display of a video game is generally a video sequence presented to a display capable of displaying the video sequence. The video sequence typically comprises a plurality of frames. As used herein, “frame” refers to an image of the video sequence. By showing frames in succession in sequence order, simulated objects appear to move. The game engine typically generates frames in real-time response to user input that is available to the game engine, so delay in receiving game inputs would normally delay the display of game play.
Online video games and other interactive applications can involve multiple users who interact or communicate with each other. There is a demand to produce interactive games with real-time capabilities for networked game play that timely respond to a user's inputs such that the user's movement of a joystick causes a character in a scene to move and the movement appears to the user to be in real-time.
An issue for real-time systems in the context of networked game play is network latency. Network latency is the time required to deliver network packets from one node within the network to another node or otherwise communicated. In a client-server model, one host on the network, the server, acts as a central communications hub for all the other hosts or clients. Typically the server is authoritative, and is responsible for routing communication between the several clients. In such situations, all game play information must first be communicated to the server before being relayed back to the client nodes. In these systems, each client node sends it's user input signals to the server. The server collects user input data from all participating nodes, generates a simulation and/or state information of the objects within the game, and delivers the results to each client node. The back-and-forth communication and server-side processing required for each frame of the game can create problems that prevent the game from playing sufficiently fast. Essentially, all of the client nodes, which cannot normally process game inputs until it receives them from the server, will wait for the simulation information provided by the server. The communications between the server and client(s) are also subject to network latency.
In the peer-to-peer networking topology, the client nodes in the network communicate directly with one another. Peer-to-peer applications largely distribute the responsibility for the simulation or application among the peers. Essentially, each peer node performs the same simulation as the other peer nodes. By performing the simulations locally, the peer nodes are not dependent on the simulation processing performed by a server in the client-server model. As a consequence of moving the responsibility of generating the simulations on the local systems, this topology may save some trips, but it requires synchronization to ensure the states between the peer nodes are in harmony. Typically, the synchronization of game states among the peer nodes necessitates that the local node waits to generate a simulation for a particular frame until inputs from all peer nodes are received for that frame. Thus, each peer node waits for communication of input signals by other peers. The communications between the peer nodes are also subject to network latency. To the extent network latency is noticeable to a user, real-time interactivity is impaired. Ideally, the user should not perceive any lack of responsiveness of the game.
In any networking scenario, the sending and receiving of inputs for each frame can produce large amounts of network traffic. Networks however have a limited capacity to convey information, and multiple computers and applications must share that limited resource. For example, networks such as the Internet connect several computers with network links having a limited bandwidth that is shared among the many computers, each of which wants to maximize its usage of available bandwidth. When attempted data rates exceed the network capacity to convey that data, the network congests and the effective network capacity becomes a small fraction of the theoretical capacity, producing network delays. Uncongested networks may have latency due to the time needed for packets to traverse the network. Where latency is significant, interactive video games are impractical and interactions between users across the network are significantly degraded.